﻿@model IEnumerable<MvcApplication4.Models.Post>

@{
    Layout = null;
}

    <div>
        <h1>Contained Posts</h1>
    </div>

    <table>
    <tr>
        <th class="td-label">
            @Html.DisplayNameFor(model => model.User.UserName)
        </th>
        <th class="td-label">
            @Html.DisplayNameFor(model => model.Time)
        </th>
        <th class="td-label" >
            @Html.DisplayNameFor(model => model.Text)
        </th>
    </tr>
    @foreach (var item in Model) {
    <tr>
        <td class="td-field">
            @Html.DisplayFor(modelItem => item.User.UserName)
        </td>
        <td class="td-field">
            @Html.DisplayFor(modelItem => item.Time)
        </td>
        <td class="td-field" id="td-field-Title">
            @Html.DisplayFor(modelItem => item.Text)
        </td>
    </tr>
    }
</table>
